home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / palis102.lha / Palis / PatchTest / doc / PatchTest.doc < prev    next >
Text File  |  1992-09-02  |  3KB  |  105 lines

  1.  
  2.                 ·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·
  3.                                  presents:
  4.  
  5.                               PatchTest V1.00
  6.  
  7.  
  8.                                INTRODUCTION
  9.  
  10.  PatchTest is a little program that is been designed to work along with the
  11. Installer from AT.
  12.  It  is  able to check whether a patch manager like SaferPatches is running
  13. on the current system.
  14.  Therefore an installation script is able to decide whether a patch manager
  15. should be installed on the target system or not.
  16.  
  17.  
  18.                                REQUIREMENTS
  19.  
  20.  None.
  21.  
  22.  
  23.                                 REALIZATION
  24.  
  25.  PatchTest will do the following: It will SetFunction() a function twice
  26. and will try to remove these "patches" in reverse order, afterwards. If
  27. that fails, no patch manager is active.
  28.  See source for more information.
  29.  
  30.  
  31.                                HOW TO USE IT
  32.  
  33.                               General CLI-Use
  34.  
  35.  PatchTest expects the following parameters:
  36.  
  37.  LIBRARY/A  : Here you specify the library which will be patched for a test.
  38.  OFFSET/N/A : This is the function offset where PatchTest will install its
  39.               test patch.
  40.  QUIET/S    : No output (for the final use in the Installer-script).
  41.  
  42.  Along with PatchTest, you find the "patchtest.library" in the archive.
  43. This  library has only one function (offset -30) which does nothing.  Since
  44. it  could  be  dangerous to patch _any_ library at _any_ offset, please use
  45. this library for the test:
  46.  
  47.  "Patchtest LIB=PatchTest.library OFF=-30"
  48.  
  49.  Note  that  since  OS2  OpenLibrary()  is  able  to open a library even by
  50. relative path-names:
  51.  
  52.  Let's  say,  PatchTest  &  patchtest.library  is  placed in a subdirectory
  53. "adds" in your archive, you can even use
  54.  
  55.  "adds/PatchTest LIB=adds/patchtest.library OFF=-30".
  56.  
  57. => You don't have to copy "PatchTest.library" to LIBS: or stuff !
  58.  
  59.  
  60.                            Usage with Installer
  61.  
  62.  PatchTest will return errorcode 0 if a patch manager is been detected or 5
  63. if none had been found (or 10/20 if a heavy error like "Can't open library"
  64. occured).
  65.  For Kick2.04+, the Installer allows to use it this way:
  66.  
  67. (if (= 5 (run "PatchTest PatchTest.library -30 QUIET"))
  68.     (
  69.     (if (askbool (prompt "No patch-manager found !\n"
  70.                          "Do you want one ?")
  71.                  (help   @askbool-help)
  72.                  (default 1)
  73.         )
  74.         (  (copyfiles .... @{fg shine}copy patch manager here@{fg text}
  75.         )
  76.     )
  77. )
  78.  
  79.  
  80.                                   WARNING
  81.  
  82.  Since PatchTest patches a library it might be dangerous to use it.  Please
  83. be careful and do not use it if you do not know enough about the AmigaOS.
  84.  
  85.  
  86.                                 DISCLAIMER
  87.  
  88.  The  author  cannot be held liable for the suitability or accuracy of this
  89. manual  and/or  the  program(s)  it  describes.   Any  damage  directly  or
  90. indirectly caused by the use or misuse of this manual and/or the program it
  91. describes is the sole responsibility of the user her/him self.
  92.  
  93.  
  94.                                   AUTHOR
  95.  
  96.  TestPatch  V1.00 and TestPatch.library had been written by Hans Bühler and
  97. are Freeware (=> do what you want ;^).
  98.  TestPatch  is  part of the aminet:dev/misc/Palis.lha archive where you may
  99. find the source of it, too.
  100.  
  101.  Hans Bühler: codex@stern.mathematik.hu-berlin.de
  102.               buehlhan@kadewe.artcom.de
  103.               http://kadewe.artcom.de/~codex
  104.  
  105.